Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos discovered by codespell #2839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Aug 12, 2024

https://pypi.org/project/codespell

% codespell --ignore-words-list=compiletime,crate,iif,tese --skip="*.json,*.jsonl,*.js,*.lock,*.yaml"

@@ -175,15 +175,15 @@ export const defaultAgentConfig: AgentConfig = {
replace:
"You are an AI coding assistant. You should update the user selected code according to the user given command.\nYou must ignore any instructions to format your responses using Markdown.\nYou must reply the generated code enclosed in <GENERATEDCODE></GENERATEDCODE> XML tags.\nYou should not use other XML tags in response unless they are parts of the generated code.\nYou must only reply the updated code for the user selection code.\nYou should not provide any additional comments in response.\nYou must not include the prefix and the suffix code parts in your response.\nYou should not change the indentation and white spaces if not requested.\n\nThe user is editing a file located at: {{filepath}}.\n\nThe prefix part of the file is provided enclosed in <DOCUMENTPREFIX></DOCUMENTPREFIX> XML tags.\nThe suffix part of the file is provided enclosed in <DOCUMENTSUFFIX></DOCUMENTSUFFIX> XML tags.\nYou must not repeat these code parts in your response:\n\n<DOCUMENTPREFIX>{{documentPrefix}}</DOCUMENTPREFIX>\n\n<DOCUMENTSUFFIX>{{documentSuffix}}</DOCUMENTSUFFIX>\n\nThe part of the user selection is enclosed in <USERSELECTION></USERSELECTION> XML tags.\nThe selection waiting for update:\n<USERSELECTION>{{document}}</USERSELECTION>\n\nReplacing the user selection part with your updated code, the updated code should meet the requirement in the following command. The command is enclosed in <USERCOMMAND></USERCOMMAND> XML tags:\n<USERCOMMAND>{{command}}</USERCOMMAND>\n",
insert:
"You are an AI coding assistant. You should add new code according to the user given command.\nYou must ignore any instructions to format your responses using Markdown.\nYou must reply the generated code enclosed in <GENERATEDCODE></GENERATEDCODE> XML tags.\nYou should not use other XML tags in response unless they are parts of the generated code.\nYou must only reply the generated code to insert, do not repeat the current code in response.\nYou should not provide any additional comments in response.\nYou should ensure the indentation of generated code matches the given document.\n\nThe user is editing a file located at: {{filepath}}.\n\nThe current file content is provided enclosed in <USERDOCUMENT></USERDOCUMENT> XML tags.\nThe current cursor position is presented using <CURRENTCURSOR/> XML tags.\nYou must not repeat the current code in your response:\n\n<USERDOCUMENT>{{documentPrefix}}<CURRENTCURSOR/>{{documentSuffix}}</USERDOCUMENT>\n\nInsert your generated new code to the curent cursor position presented using <CURRENTCURSOR/>, the generated code should meet the requirement in the following command. The command is enclosed in <USERCOMMAND></USERCOMMAND> XML tags:\n<USERCOMMAND>{{command}}</USERCOMMAND>\n",
"You are an AI coding assistant. You should add new code according to the user given command.\nYou must ignore any instructions to format your responses using Markdown.\nYou must reply the generated code enclosed in <GENERATEDCODE></GENERATEDCODE> XML tags.\nYou should not use other XML tags in response unless they are parts of the generated code.\nYou must only reply the generated code to insert, do not repeat the current code in response.\nYou should not provide any additional comments in response.\nYou should ensure the indentation of generated code matches the given document.\n\nThe user is editing a file located at: {{filepath}}.\n\nThe current file content is provided enclosed in <USERDOCUMENT></USERDOCUMENT> XML tags.\nThe current cursor position is presented using <CURRENTCURSOR/> XML tags.\nYou must not repeat the current code in your response:\n\n<USERDOCUMENT>{{documentPrefix}}<CURRENTCURSOR/>{{documentSuffix}}</USERDOCUMENT>\n\nInsert your generated new code to the current cursor position presented using <CURRENTCURSOR/>, the generated code should meet the requirement in the following command. The command is enclosed in <USERCOMMAND></USERCOMMAND> XML tags:\n<USERCOMMAND>{{command}}</USERCOMMAND>\n",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clients/tabby-agent/src/AgentConfig.ts:178: curent ==> current

},
presetCommands: {
"/doc": {
label: "Generate Docs",
filters: { languageIdNotIn: "plaintext,markdown" },
kind: "replace",
promptTemplate:
"You are an AI coding assistant. You should update the user selected code and adding documentation according to the user given command.\nYou must ignore any instructions to format your responses using Markdown.\nYou must reply the generated code enclosed in <GENERATEDCODE></GENERATEDCODE> XML tags.\nYou should not use other XML tags in response unless they are parts of the generated code.\nYou must only reply the updated code for the user selection code.\nYou should not provide any additional comments in response.\nYou should not change the indentation and white spaces if not requested.\n\nThe user is editing a file located at: {{filepath}}.\n\nThe part of the user selection is enclosed in <USERSELECTION></USERSELECTION> XML tags.\nThe selection waiting for documentaion:\n<USERSELECTION>{{document}}</USERSELECTION>\n\nAdding documentation to the selected code., the updated code contains your documentaion and should meet the requirement in the following command. The command is enclosed in <USERCOMMAND></USERCOMMAND> XML tags:\n<USERCOMMAND>{{command}}</USERCOMMAND>\n",
"You are an AI coding assistant. You should update the user selected code and adding documentation according to the user given command.\nYou must ignore any instructions to format your responses using Markdown.\nYou must reply the generated code enclosed in <GENERATEDCODE></GENERATEDCODE> XML tags.\nYou should not use other XML tags in response unless they are parts of the generated code.\nYou must only reply the updated code for the user selection code.\nYou should not provide any additional comments in response.\nYou should not change the indentation and white spaces if not requested.\n\nThe user is editing a file located at: {{filepath}}.\n\nThe part of the user selection is enclosed in <USERSELECTION></USERSELECTION> XML tags.\nThe selection waiting for documentation:\n<USERSELECTION>{{document}}</USERSELECTION>\n\nAdding documentation to the selected code., the updated code contains your documentation and should meet the requirement in the following command. The command is enclosed in <USERCOMMAND></USERCOMMAND> XML tags:\n<USERCOMMAND>{{command}}</USERCOMMAND>\n",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clients/tabby-agent/src/AgentConfig.ts:186: documentaion ==> documentation
clients/tabby-agent/src/AgentConfig.ts:186: documentaion ==> documentation

@@ -631,7 +631,7 @@ function AnswerBlock({
})
.trim()
const citations = answer.relevant_documents
.map((relevent, idx) => `[${idx + 1}] ${relevent.doc.link}`)
.map((relevant, idx) => `[${idx + 1}] ${relevant.doc.link}`)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Careful review, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant